import request from '@/utils/request.js'

// 质检点table
export const pointList = (data) => {
    return request({
        url: '/point/list',
        method: 'post',
        data: data
    })
}

// 词类列表
export const wordList = (id) => {
    return request({
        url: '/word/list/' + id,
        method: 'get'
    })
}
// 新增质检点
export const newPoint = (data) => {
    return request({
        url: '/point',
        method: 'post',
        data: data
    })
}

// 删除质检点
export const delPoint = (id) => {
    return request({
        url: `/point/${id}`,
        method: 'delete'
    })
}

// 质检点详情
export const detailPoint = (id) => {
    return request({
        url: '/point/' + id,
        method: 'get'
    })
}

// 编辑质检点
export const editPoint = (data) => {
    return request({
        url: '/point',
        method: 'put',
        data: data
    })
}

// 分组规则列表
export const ruleList = (id) => {
    return request({
        url: '/rule/list/' + id,
        method: 'get'
    })
}

// 新增分组
export const newRule = (data) => {
    return request({
        url: '/rule',
        method: 'post',
        data: data
    })
}

// 分组详情
export const detailRule = (id) => {
    return request({
        url: '/rule/' + id,
        method: 'get'
    })
}

// 编辑分组
export const editRule = (data) => {
    return request({
        url: '/rule',
        method: 'put',
        data: data
    })
}

// 删除分组
export const delRule = (id) => {
    return request({
        url: `/rule/${id}`,
        method: 'delete'
    })
}
